<?php

$manager = new MongoDB\Driver\Manager("mongodb://myUserAdmin:db(*)2020@39.100.232.218:37017/?authSource=admin");



//$bulk = new MongoDB\Driver\BulkWrite();

$filter = ['age' => ['$gt' => 0]];
$options = [
    'sort' => ['age' => 1]
];

$query = new MongoDB\Driver\Query($filter,$options);

$cursor = $manager->executeQuery('my_test.history' ,$query);

var_dump($cursor);

foreach ($cursor as $doc) {
    print_r($doc);
}